package com.lixinyue.exer2;

public class Bank {
    private Customer[] customers;
    private int numberOfCustoer;
    public Bank()
    {
        customers=new Customer[10];
    }
    public void addCustomer(String f,String l)
    {

        Customer c1 = new Customer(f, l);
        customers[numberOfCustoer++]=c1;

    }
    public int  getNumOfCustomer()
    {
        return numberOfCustoer;
    }
    public Customer getCustomer(int index)
    {
        if((index<numberOfCustoer)&&(index>=0)) {
            return customers[index];
        }
        return null;

    }
}
